package com.atguigu.ssyx.acl.service;

import com.atguigu.ssyx.model.acl.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface PermissionService extends IService<Permission> {

    //查询所有菜单
    List<Permission> queryAllPermission();

    //递归删除菜单
    void removeChildById(Long id);

    public List<Permission> queryAllMenu();
    /**
     * 分配菜单
     * @param roleid
     * @param permissionIds
     */
    void saveRolePermissionRealtionShip(Long roleid, Long[] permissionIds);

    /**
     * 根据菜单获取权限数据
     * @param roleId
     * @return
     */
    Map<String, Object> findPermissionByRoleId(Long roleId);
}
